#pragma once

#include <osg/Referenced>
#include "corebase_global.h"
#include <QString>

namespace CoreBase
{
	class COREBASE_EXPORT ActorProperty:public osg::Referenced
	{
	public:
		virtual void copyFrom(const ActorProperty& otherprop) = 0;
		virtual const QString toQString() const = 0;
		virtual bool fromString(const QString& value) = 0;
		const std::string& getLabel() const 
		{
			return _label; 
		}
		const QString& bindingGuiType() const 
		{
			return _bindingGuiType;
		}
		bool isReadOnly() const 
		{ 
			return _readOnly;
		}
		void setReadOnly(bool readonly)
		{
			_readOnly = readonly;
		}
		void setShowGui(const QString& isshow) 
		{
			_isShow = isshow; 
		}
		const QString& getShowGui() const 
		{
			return _isShow;
		}
		void setGroupName(const QString& name) 
		{
			_groupName = name; 
		}
		const QString& getGroupName() const 
		{
			return _groupName;
		}
		void setName(const QString& name) 
		{
			_name = name; 
		}
		const QString& getName() const 
		{
			return _name;
		}
		void setDataType(const QString& datatype) 
		{
			_dataType = datatype; 
		}
		const QString& getDataType() const 
		{
			return _dataType;
		}
	protected:
		ActorProperty(const QString& datatype,const QString& name,
			const std::string& label,const QString& isshowgui,
			const QString& bindingguitype,bool  readonly = false);
		virtual ~ActorProperty();
	protected:
		QString					_groupName;
		std::string				_label;
		QString					_isShow;
		QString					_dataType;
		QString					_name;
		bool					_readOnly;
		QString					_bindingGuiType;

		ActorProperty& operator=(const ActorProperty&);
	};
}